#ifndef __UART_H
#define __UART_H

extern u8 GPS_Number;
extern u8 Buf_Number;
extern u8 GPRS_Number;
extern u8 Heart_Flag;
extern u8 sent_CMD;

extern void UART1_SendByte(u16 dat);
extern void UART1Write(u8* data);
void UART1WriteBuff(u8* data, u16 len);
void Delay1ms(u16 time);

extern void UART2_SendByte(u16 dat);
extern void UART2_SendString(u8* data);

extern void UART3_SendByte(u16 dat);
extern void UART3_SendString(u8* data);


void USART1_Configuration(void);
void USART2_Configuration(void);
void USART3_Configuration(void);

void log1(const char * format, ...);
void log2(const char * format, ...);

#if defined (DEBUG_LOG)
#define LOG(format, ...) log1(format, ##__VA_ARGS__);
#define PRINT(format, ...) log2(format, ##__VA_ARGS__);
#else
#define LOG(format, ...) 
#define PRINT(format, ...)  
#endif

#endif
